% jacrhs.m ——— rhs 的雅可比矩阵
% 输入： X (3×1)，params 结构体包含 a,b,beta,A,omega,alpha
% 输出： J (3×3)

function J = jac(X, a, b, beta, A, omega, alpha)
    x = X(1); y = X(2); z = X(3);
    J = zeros(3,3);
    J(1,1) = -alpha*( -1 + (y-x)^2 + a + 3*b*z^2 );
    J(1,2) = -alpha*(   1 - (y-x)^2 );
    J(1,3) = -alpha*( 6*b*z*x );
    J(2,1) = -1 + (y-x)^2;
    J(2,2) =  1 - beta - (y-x)^2;
    J(2,3) =  0;
    J(3,1) = 1;
    J(3,2) = 0;
    J(3,3) = 0;
end






